package com.oasystem.web.webbean.fund;

import com.oasystem.domain.fund.FundApplication;
import com.oasystem.domain.fund.FundClassification;
import com.oasystem.domain.user.User;
import com.oasystem.enums.EApproveStatus;

public class FundApplicationWebBean {
	private String id;
	private String applicantId;
	private String classification;
	private String amount;
	private String consumeTime;
	private String approver;
	private String approveStatus;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getApplicantId() {
		return applicantId;
	}

	public void setApplicantId(String applicantId) {
		this.applicantId = applicantId;
	}

	public String getClassification() {
		return classification;
	}

	public void setClassification(String classification) {
		this.classification = classification;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getConsumeTime() {
		return consumeTime;
	}

	public void setConsumeTime(String consumeTime) {
		this.consumeTime = consumeTime;
	}

	public String getApprover() {
		return approver;
	}

	public void setApprover(String approver) {
		this.approver = approver;
	}

	public String getApproveStatus() {
		return approveStatus;
	}

	public void setApproveStatus(String approveStatus) {
		this.approveStatus = approveStatus;
	}

	public FundApplication buildFundApplication() {
		FundApplication domain = new FundApplication();
		domain.setAmount(Double.valueOf(this.amount));
		// TODO:
		domain.setApplicantId("1");
		domain.setConsumeTime(consumeTime);
		domain.setClassification(new FundClassification(this.classification));
		domain.setApprover(new User(this.approver));
		domain.setApproveStatus(EApproveStatus.IN_PROGRESS);
		return domain;
	}

}
